package com.itheima.String;

public class Test {
    public static void main(String[] args) {
       /* String s1 = new String();
        System.out.println(s1);

        char[] chs = {'a', 'b', 'c'};
        String s2 = new String(chs);
        System.out.println(s2);

        String s3 = new String("");
        System.out.println(s3);

        byte[] bys = {97, 98, 99};
        String s4 = new String(bys);
        System.out.println("s4 = " + s4);

        String s5 = "abc";
        System.out.println("s5 = " + s5);*/

        String s3 = new String("abc");
        String s4 = new String("abc");
        System.out.println(s3 == s4);

        String s5 = "ab";
        String s6 = s5 + "c";
        String s7 = new String("abc");
        System.out.println(s6 == s7);
        String s8 = s5 + "c";
        System.out.println(s6 == s8);

        String s9 = "ab" + "c";
        String s10 = "a" + "b" + "c";
        System.out.println(s9 == s10);


    }
}
